A Crossing with Java Threads and POSIX Threads

نویسنده

  • Wim H. Hesselink
چکیده

The primitives for Java threads and POSIX threads are compared by means of a simulation of cars at a crossing. These cars have to be synchronized in such a way that at every moment only cars in one direction proceed. The initial solution is based on compound await statements. This solution is subsequently implemented with Java threads and POSIX threads. These two thread formalisms differ: POSIX threads can wait at condition variables of a greater generality than available in Java, but the corresponding queues may be leaky.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Comparison of Multithreading Implementations

Research has shown that a multithreaded algorithm implemented using Cilk threads performs dramatically better than a Posix threads or Java threads implementation. Multithreaded implementations are commonplace in areas of Computer Science such as artificial intelligence, therefore an optimal implementation is highly desirable. An algorithm that uses double recursion to compute the Fibonnaci func...

متن کامل

(Antoine de Saint-Exupéry, “L’Avion”, Ch. III)

Deadlock immunity is a property by which programs, once afflicted by a given deadlock, develop resistance against future occurrences of that and similar deadlocks. We describe a technique that enables programs to automatically gain such immunity without assistance from programmers or users. We implemented the technique for both Java and POSIX threads and evaluated it with several real systems, ...

متن کامل

Deadlock Immunity: Enabling Systems to Defend Against Deadlocks

Deadlock immunity is a property by which programs, once afflicted by a given deadlock, develop resistance against future occurrences of that and similar deadlocks. We describe a technique that enables programs to automatically gain such immunity without assistance from programmers or users. We implemented the technique for both Java and POSIX threads and evaluated it with several real systems, ...

متن کامل

Design and Implementation of Triveni: A Process-Algebraic API for Threads + Events

We describe Triveni, a framework and API for integrating threads and events. The design of Triveni is based on an algebra, including preemption combinators, of processes. Triveni is compatible with existing threads standards, such as Pthreads and Java threads, and with the event models structured on the Observer pattern. We describe the software architecture and algorithms underlying a concrete...

متن کامل

Implementing the Nanothreads Programming Model on Top of Posix Threads

Goal of this paper is the efficient and portable implementation of the Nanothreads Programming Model (NPM), a dependence-driven two-level threads model for shared-memory multiprocessors, on top of the POSIX Threads API. Our general approach is to combine portability with efficiency by implementing the machine dependent components of the runtime system based on POSIX threads and defining an appr...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2001